/*
 * Contact.java
 *
 * Created on March 18, 2009, 8:51 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.vacuela.publish.desktop;

import com.u2d.list.RelationalList;
import com.u2d.model.AbstractComplexEObject;
import com.u2d.model.Title;
import com.u2d.type.atom.StringEO;
import java.awt.Color;

/**
 *
 * @author nestor.carrasco
 */
public class Contact extends AbstractComplexEObject {
    private  final StringEO name = new StringEO();
    private MyGroup _myGroup;
    public static String mygroupInverseFieldName = "contacts";
    
    
  private final RelationalList _phones = new RelationalList(Phone.class);
  public static Class phonesType = Phone.class;
  public static String phonesInverseFieldName = "contact";
  
     public static Color colorCode = new Color(0x8B7355);
   public static String[] fieldOrder =   {"name", "mygroup","phones"}; 
   public static String[] hidden = {"mygroup"};
 
    
    /** Creates a new instance of Contact */
    public Contact() {
    }

    public StringEO getName() {
        return name;
    }

    public Title title() {
        return name.title();
    }
    
      public MyGroup getMygroup() { return _myGroup; }
   public void setMygroup(MyGroup group)
   {
      MyGroup oldGroup = _myGroup;
      _myGroup = group;
      firePropertyChange("mygroup", oldGroup, _myGroup);
   }
    
   public RelationalList getPhones() { return _phones; }
}
